import request from '@/utils/request'
export default{
    //获取所有科室列表
    getDeptList(){
        return request({
            url:'scheduling/getDeptList',
            method:'GET'
        })
    },
    //获取指定科室可排班的医生列表
    getUserRole(id){
        return request({
            url:'scheduling/getUserRole',
            method:'GET',
            params:{
                deptID:id
            }
        })
    },
    //获取所有的医生排班的规则 
    getAllUserRole(){
        return request({
            url:'scheduling/getAllUserRole',
            method:'GET',
        })
    },
    //修改排班规则的方法
    updateRole(obj){
        return request({
            url:'scheduling/updateRole',
            method:'POST',
            data:{
                delMark:obj.delMark,
                id:obj.id,
                realName:obj.realName,
                ruleName:obj.ruleName,
                userID:obj.userID,
                week:obj.week
            }
        })
    },
    //根据科室查找用户
    getUserByDeptID(id){
        return request({
            url:'scheduling/getUserByDeptID',
            method:'GET',
            params:{
                deptID:id
            }
        })
    },
    //添加一个排班规则
    addRule(obj){
        return request({
            url:'scheduling/addRule',
            method:'POST',
            data:obj
                // ruleName:obj.ruleName,
                // deptID:obj.deptID,
                // userID:obj.userID,
                // week:obj.week,
                // DeptType:1,
            
        })
    }

}